<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>登录</title>
    <link rel="stylesheet" href="tankuang.css">
</head>
<body>
    <div class="dibian">
        <button id="denglu">登录</button>
    </div>
    <div class="beijing hide"></div>
    <div class="tankuang hide">
        <button id='quxiao'>取消</button>
    </div>
</body>
<script type="text/javascript">
    var button=document.getElementById('denglu')
    button.onclick=function () {
    var beijing=document.getElementsByClassName('beijing')[0]
    var tankuang=document.getElementsByClassName('tankuang')[0]
    beijing.classList.remove('hide')
    tankuang.classList.remove('hide')
    }
    var button=document.getElementById('quxiao')
    button.onclick=function () {
    var beijing=document.getElementsByClassName('beijing')[0]
    var tankuang=document.getElementsByClassName('tankuang')[0]
    beijing.classList.add('hide')
    tankuang.classList.add('hide')
    }
</script>
</html>